{extend name='main'}

{block name="content"}
<div class="think-box-shadow">
    <div class="layui-tab layui-tab-card think-bg-white">
        <ul class="layui-tab-title">
            {foreach ['index'=>'全部','is_deleted'=>'回收站'] as $k=>$v}
            {if isset($typeOf) and $typeOf eq $k}
            <li class="layui-this" data-open="{:url('index')}?typeOf={$k}">{$v}</li>
            {else}
            <li data-open="{:url('index')}?typeOf={$k}">{$v}</li>
            {/if}{/foreach}
        </ul>
        <div class="layui-tab-content">
            {include file='trade_log/search'}
            <table id="BaseData" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
        </div>
        <table class="layui-table margin-top-10" lay-skin="line" lay-filter="test">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='list-table-sort-td'>
                    <button class="layui-btn layui-btn-xs" data-reload type="button">刷 新</button>
                </th>
                <th class='text-center'></th>
                <th colspan="11"></th>
            </tr>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th width="" class='text-center nowrap'>用户名</th>
                <th width="" class='text-center nowrap'>订单号</th>
                <th width="" class='text-center nowrap'>类型</th>
                <th width="" class='text-center nowrap'>实际金额</th>
                <th width="" class='text-center nowrap'>支付平台</th>
                <th width="" class='text-center nowrap'>支付单号</th>
                <th width="" class='text-center nowrap'>支付状态</th>
                <th width="" class='text-center nowrap'>实际支付金额</th>
                <th width="" class='text-center nowrap'>支付时间</th>
                <th width="" class='text-center nowrap'>订单状态</th>
                <th width="" class='text-center nowrap'>创建时间</th>
                <th width="" class='text-center nowrap'>状态</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
                </td>
                <td class="text-center nowrap">{$vo.User.username|default=""}</td>
                <td class="text-center nowrap">{$vo.order_no|default=""}</td>
                <td class="text-center nowrap">{$vo.type|getOrderType}</td>
                <td class="text-center nowrap">{$vo.amount_real|default=""}</td>
                <td class="text-center nowrap">{$vo.payment_type|default=''}</td>
                <td class="text-center nowrap">{$vo.payment_trade|default="-"}</td>
                <td class="text-center nowrap">{$vo.payment_status|default=""}</td>
                <td class="text-center nowrap">{$vo.payment_amount|default=""}</td>
                <td class="text-center nowrap">{eq name='vo.payment_time' value='0'}-{else}{$vo.payment_time|date="Y-m-d H:i:s"}{/eq}</td>
                <td class="text-center nowrap">{$vo.status|getOrderStatus}</td>
                <td class="text-center nowrap">{$vo.create_time|date="Y-m-d H:i:s"}</td>
                <td class="text-center nowrap">
                    {eq name='vo.is_deleted' value='0'}<span class="layui-badge layui-bg-green">正常</span>{else}<span
                        class="layui-badge">已删除</span>{/eq}
                </td>
            </tr>
            {/foreach}
            </tbody>
            <script>
                layui.form.render();
            </script>
        </table>
    </div>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>

{/block}